import { createRouter, createWebHistory } from 'vue-router'
import Index from '@/layout/index.vue'
import Home from '@/views/home/index.vue'
const routes = [
  {
    path: '/',
    redirect: '/home',
    name: 'index',
    component: Index,
    children: [
      {
        path: '/home',
        name: 'home',
        component: Home
      }
    ]
  },
  {
    path: '/song-list',
    name: 'song-list',
    component: () => import('@/views/songDetail/index.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
